import request from '@/utils/request'

// export function login(username, password) {
  
//   return request({
//     url: '/user/login',
//     method: 'post',

//     data: {
//       //登录接口
//       userName: username,
//       passwd: password
//     }
//   })
// }

export default {
    // 获取信息
    getStuInfo(searchModel) {
        return request({
            url: '/sys/user',
            method: 'get',
            params: {
                pageNo: searchModel.pageNo,
                pageSize: searchModel.pageSize,
                userName: searchModel.userName,
                userId: searchModel.userId,
                role: searchModel.role
            }
        })
    },
    addUser(user){
        return request({
            url: '/user',
            method: 'post',
            data: user
        });
    },
    getSchoInfoById(stuId){
        return request({
            // url: '/user' + stuId,
            url: `/user/${id}`,
            method: 'get',
            data: user
        })
    },
    updateSchoinfo(user){
        return request({
            // url: '/user' + stuId,
            url: `/user`,
            method: 'put',
            data: user
        })
        
    }
    
    
}
